import Mock from 'mockjs'
import HomeApi from './home'
import UserApi from './user'
import PermissionApi from './permission'

Mock.setup({
  timeout: '200-2000',
})

//拦截 /home/getData
Mock.mock(/\/home\/getData/, 'get', HomeApi.getStatisticalData)
Mock.mock(/\/user\/getUser/, 'get', UserApi.getUserList)
Mock.mock(/\/user\/addUser/, 'post', UserApi.createUser)
Mock.mock(/\/user\/delUser/, 'get', UserApi.deleteUser)
Mock.mock(/\/user\/editUser/, 'post', UserApi.updateUser)

Mock.mock(/\/permission\/getMenu/, 'post', PermissionApi.getMenu)
